package cn.sundat.dao;

import java.util.List;

import org.hibernate.criterion.DetachedCriteria;

import cn.sundat.model.Company;
import cn.sundat.model.PageBean;

public interface CompanyDao extends BaseDao<Company>{

	/**
	 * 用户登录，根据返回值判断用户现在的状态
	 * @param username
	 * @param password
	 * @return
	 */
	int checkLogin(DetachedCriteria criteria);
	
	List<Company> login(DetachedCriteria criteria);

	Company findByName(String comp_name);
	
	public List<Company> listCompany();
	public List<Company> auditList();
	List<Company> findCompanyByKey(String key, String value);
	List<Company> findCompanyById(Long id);
	PageBean<Company> findByLevel(DetachedCriteria criteria, int currPage, Integer pageSize);
	void regApprove(Long id);
	PageBean<Company> findPbByName(Integer currPage, Integer pageSize, DetachedCriteria criteria);

	void ApproveUpdateLevel(Long id,Integer nextLevel);

	List<Company> updateLevelList();
}
